<template>
  <div class="red">
    <h1>{{user1}}</h1>
  </div>
</template>

<script>
import bus from './bus.js'
export default {
  data () {
    return {
      user1: {}
    }
  },
  created () {
    let that = this;
    bus.$on('sendData', function (obj) {
      // this.user1 = obj
      that.user1 = obj
    })
  }
}
</script>

<style lang="less" scoped>
.red {
  background: red;
  flex: 1;
}
</style>